home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / tilebi1a / tiletest.frm < prev    next >
Text File  |  1999-10-01  |  9KB  |  233 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
  3. Begin VB.Form TileTest 
  4.    Caption         =   "Bitmap Tile Test (+ or - to change Bitmaps)"
  5.    ClientHeight    =   4290
  6.    ClientLeft      =   2610
  7.    ClientTop       =   1545
  8.    ClientWidth     =   6690
  9.    KeyPreview      =   -1  'True
  10.    LinkTopic       =   "Form1"
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   4290
  13.    ScaleWidth      =   6690
  14.    Begin VB.PictureBox Picture1 
  15.       AutoSize        =   -1  'True
  16.       BorderStyle     =   0  'None
  17.       Height          =   240
  18.       Left            =   0
  19.       Picture         =   "TileTest.frx":0000
  20.       ScaleHeight     =   240
  21.       ScaleWidth      =   240
  22.       TabIndex        =   0
  23.       Top             =   0
  24.       Width           =   240
  25.    End
  26.    Begin ComctlLib.ImageList ImageList1 
  27.       Left            =   240
  28.       Top             =   0
  29.       _ExtentX        =   1005
  30.       _ExtentY        =   1005
  31.       BackColor       =   -2147483643
  32.       ImageWidth      =   80
  33.       ImageHeight     =   50
  34.       MaskColor       =   12632256
  35.       _Version        =   327682
  36.       BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
  37.          NumListImages   =   32
  38.          BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  39.             Picture         =   "TileTest.frx":00CE
  40.             Key             =   ""
  41.          EndProperty
  42.          BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  43.             Picture         =   "TileTest.frx":14C0
  44.             Key             =   ""
  45.          EndProperty
  46.          BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  47.             Picture         =   "TileTest.frx":1752
  48.             Key             =   ""
  49.          EndProperty
  50.          BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  51.             Picture         =   "TileTest.frx":19E4
  52.             Key             =   ""
  53.          EndProperty
  54.          BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  55.             Picture         =   "TileTest.frx":1C56
  56.             Key             =   ""
  57.          EndProperty
  58.          BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  59.             Picture         =   "TileTest.frx":1D68
  60.             Key             =   ""
  61.          EndProperty
  62.          BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  63.             Picture         =   "TileTest.frx":25FA
  64.             Key             =   ""
  65.          EndProperty
  66.          BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  67.             Picture         =   "TileTest.frx":288C
  68.             Key             =   ""
  69.          EndProperty
  70.          BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  71.             Picture         =   "TileTest.frx":2BB2
  72.             Key             =   ""
  73.          EndProperty
  74.          BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  75.             Picture         =   "TileTest.frx":2E44
  76.             Key             =   ""
  77.          EndProperty
  78.          BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  79.             Picture         =   "TileTest.frx":4E296
  80.             Key             =   ""
  81.          EndProperty
  82.          BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  83.             Picture         =   "TileTest.frx":5E6E8
  84.             Key             =   ""
  85.          EndProperty
  86.          BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  87.             Picture         =   "TileTest.frx":6677A
  88.             Key             =   ""
  89.          EndProperty
  90.          BeginProperty ListImage14 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  91.             Picture         =   "TileTest.frx":66AEC
  92.             Key             =   ""
  93.          EndProperty
  94.          BeginProperty ListImage15 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  95.             Picture         =   "TileTest.frx":66D0E
  96.             Key             =   ""
  97.          EndProperty
  98.          BeginProperty ListImage16 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  99.             Picture         =   "TileTest.frx":6FE00
  100.             Key             =   ""
  101.          EndProperty
  102.          BeginProperty ListImage17 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  103.             Picture         =   "TileTest.frx":70092
  104.             Key             =   ""
  105.          EndProperty
  106.          BeginProperty ListImage18 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  107.             Picture         =   "TileTest.frx":1304E4
  108.             Key             =   ""
  109.          EndProperty
  110.          BeginProperty ListImage19 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  111.             Picture         =   "TileTest.frx":130FF6
  112.             Key             =   ""
  113.          EndProperty
  114.          BeginProperty ListImage20 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  115.             Picture         =   "TileTest.frx":131288
  116.             Key             =   ""
  117.          EndProperty
  118.          BeginProperty ListImage21 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  119.             Picture         =   "TileTest.frx":13151A
  120.             Key             =   ""
  121.          EndProperty
  122.          BeginProperty ListImage22 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  123.             Picture         =   "TileTest.frx":1395AC
  124.             Key             =   ""
  125.          EndProperty
  126.          BeginProperty ListImage23 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  127.             Picture         =   "TileTest.frx":15EE3E
  128.             Key             =   ""
  129.          EndProperty
  130.          BeginProperty ListImage24 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  131.             Picture         =   "TileTest.frx":15F0D0
  132.             Key             =   ""
  133.          EndProperty
  134.          BeginProperty ListImage25 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  135.             Picture         =   "TileTest.frx":160362
  136.             Key             =   ""
  137.          EndProperty
  138.          BeginProperty ListImage26 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  139.             Picture         =   "TileTest.frx":1605F4
  140.             Key             =   ""
  141.          EndProperty
  142.          BeginProperty ListImage27 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  143.             Picture         =   "TileTest.frx":160866
  144.             Key             =   ""
  145.          EndProperty
  146.          BeginProperty ListImage28 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  147.             Picture         =   "TileTest.frx":160AF8
  148.             Key             =   ""
  149.          EndProperty
  150.          BeginProperty ListImage29 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  151.             Picture         =   "TileTest.frx":160C0A
  152.             Key             =   ""
  153.          EndProperty
  154.          BeginProperty ListImage30 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  155.             Picture         =   "TileTest.frx":160E9C
  156.             Key             =   ""
  157.          EndProperty
  158.          BeginProperty ListImage31 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  159.             Picture         =   "TileTest.frx":18465A
  160.             Key             =   ""
  161.          EndProperty
  162.          BeginProperty ListImage32 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  163.             Picture         =   "TileTest.frx":18DCEC
  164.             Key             =   ""
  165.          EndProperty
  166.       EndProperty
  167.    End
  168. End
  169. Attribute VB_Name = "TileTest"
  170. Attribute VB_GlobalNameSpace = False
  171. Attribute VB_Creatable = False
  172. Attribute VB_PredeclaredId = True
  173. Attribute VB_Exposed = False
  174. Option Explicit
  175.  
  176. Public gCounter As Long
  177.  
  178. Private lFirstLoad As Boolean
  179.  
  180. Private Sub Form_Activate()
  181.   
  182.   If lFirstLoad = True Then
  183.     
  184.     lFirstLoad = False
  185.     Call Form_KeyDown(vbKeyAdd, 0)
  186.     
  187.   End If
  188.   
  189. End Sub
  190.  
  191. Public Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  192.   
  193.   If KeyCode = vbKeyAdd Then
  194.   
  195.     If gCounter < ImageList1.ListImages.Count - 1 Then
  196.     
  197.       gCounter = gCounter + 1
  198.       Set Picture1.Picture = ImageList1.ListImages(gCounter).Picture
  199.   
  200.     End If
  201.   
  202.     Picture1.Refresh
  203.     TileTest.Refresh
  204.   
  205.   ElseIf KeyCode = vbKeySubtract Then
  206.         
  207.         If gCounter > 1 Then
  208.     
  209.           gCounter = gCounter - 1
  210.           Set Picture1